﻿using aier.business.logic;
using aier.dataaccess.model;
using log4net;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace aier.wx.api.selfhost.Controllers
{
    [RoutePrefix("api/Webxin")]
    public class WebxinController : ApiController
    {
        public ILog log { get; set; }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="code"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        [HttpGet]
        [ActionName("Wxgrant")]
        public string Wxgrant(string code,string state)
        {
            return "<script>http://de.aierchina.com:8082/shequ.html?code="+code+"&state="+state+"</script>";
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ActionName("CheckSignature")]
        public string CheckSignature() {
            return "CheckSignature";
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ActionName("GetOpenId")]
        public string GetOpenId() {
            return "GetOpenId";
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [ActionName("SendVerificationCode")]
        public string SendVerificationCode()
        {
            return "SendVerificationCode";
        }

        /// <summary>
        /// 绑定OpenId
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult BindOpenId(string openid,string name,string idcardNum,string mobilePhone) {

            //获取leadid

            //Create Lead

            //CreateUser

            return null;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult GetScreenList(Guid leadId) {
            return null;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult GetScreenReportScreenNum() {
            return null;
        }

        /// <summary>
        /// 根据筛查id查询
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult GetScreenReportById()
        {
            return null;
        }





    }
}
